<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>svg实现方案</title>

  <style>
    body {
      height: 100vh;
      background: grey;
    }
    .mo-di-mqn{
      text-align: center;
      width: 179px;
      height: 34px;
      position: relative;
      clip-path:polygon(8px 0%, 0% 8px,20px 100%,calc(100% - 20px) 100%,100% 8px,calc(100% - 8px) 0%);
      background:linear-gradient(RGBA(42, 60, 115, 1),rgba(239, 0, 4, 0.4));
      background:linear-gradient(RGBA(42, 60, 115, 1),rgba(239, 0, 4, 0.4));
    }
    .mo-di-mqn:before{
      width: 25px;
      height: 34px;
      content: ' ';
      position: absolute;
      left: 0;
      top: 0;
      clip-path:polygon(8px 0%, 0% 8px,20px 100%,25px 100%,5px 8px,13px 0%);
      background: linear-gradient(RGBA(215, 8, 18, 0.4),RGBA(215, 8, 18, 1));
    }
    .mo-di-mqn:after{
      width: 25px;
      height: 34px;
      content: ' ';
      position: absolute;
      right: 0;
      top: 0;
      clip-path:polygon(calc(100% - 13px) 0%, calc(100% - 5px) 8px,0% 100%,5px 100%,100% 8px,calc(100% - 5px) 0%);
      background: linear-gradient(RGBA(215, 8, 18, 0.4),RGBA(215, 8, 18, 1));
    }
  </style>
</head>
<body>
  <div class="mo-di-mqn">
    .trapezoid
  </div>
</body>
</html>